package io.bdmc.modules.bss.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.bdmc.common.utils.MyMap;
import io.bdmc.common.utils.MyPage;
import io.bdmc.common.utils.R;
import io.bdmc.modules.bss.entity.BarRegister;
import io.bdmc.modules.bss.model.BarRegisterParam;
import io.bdmc.modules.bss.service.BarRegisterService;


/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author HuangLu
 * @since 2019-02-14
 */
@RestController
@RequestMapping("/bss/reg")
public class BarRegisterController {

    @Autowired
    private BarRegisterService regSvs;

    @RequestMapping("/list")
	//@RequiresPermissions("sys:reg:list")
	public R list(BarRegisterParam params){
        //查询列表数据
        MyPage<BarRegister> myPage = new MyPage<BarRegister>(params.getCurrent(), params.getSize());
        MyPage<BarRegister> listData = regSvs.mySelectPage(myPage, params);
		return R.ok().putData(MyMap.ok(listData.getRecords(), listData.getTotal()));
    }
}

